
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-chanzi"></use>
                    </svg>
                    <div class="name">铲子</div>
                    <div class="fontclass">#el-icon-zzl-chanzi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-dimian"></use>
                    </svg>
                    <div class="name">地面</div>
                    <div class="fontclass">#el-icon-zzl-dimian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-chanche"></use>
                    </svg>
                    <div class="name">铲车</div>
                    <div class="fontclass">#el-icon-zzl-chanche</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-dengpao"></use>
                    </svg>
                    <div class="name">灯泡</div>
                    <div class="fontclass">#el-icon-zzl-dengpao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-diaoche"></use>
                    </svg>
                    <div class="name">吊车 </div>
                    <div class="fontclass">#el-icon-zzl-diaoche</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-diaoche1"></use>
                    </svg>
                    <div class="name">吊车</div>
                    <div class="fontclass">#el-icon-zzl-diaoche1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-dianyabiao"></use>
                    </svg>
                    <div class="name">电压表</div>
                    <div class="fontclass">#el-icon-zzl-dianyabiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-hunningtujiaobanji"></use>
                    </svg>
                    <div class="name">混凝土搅拌机</div>
                    <div class="fontclass">#el-icon-zzl-hunningtujiaobanji</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-hunningtujiaobanji1"></use>
                    </svg>
                    <div class="name">混凝土搅拌机 </div>
                    <div class="fontclass">#el-icon-zzl-hunningtujiaobanji1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-jiushengyi"></use>
                    </svg>
                    <div class="name">救生衣</div>
                    <div class="fontclass">#el-icon-zzl-jiushengyi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-shumu"></use>
                    </svg>
                    <div class="name">树木</div>
                    <div class="fontclass">#el-icon-zzl-shumu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-xueshan"></use>
                    </svg>
                    <div class="name">雪山</div>
                    <div class="fontclass">#el-icon-zzl-xueshan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-bieshu"></use>
                    </svg>
                    <div class="name">别墅</div>
                    <div class="fontclass">#el-icon-zzl-bieshu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-jiudian"></use>
                    </svg>
                    <div class="name">酒店</div>
                    <div class="fontclass">#el-icon-zzl-jiudian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-pailide"></use>
                    </svg>
                    <div class="name">拍立得</div>
                    <div class="fontclass">#el-icon-zzl-pailide</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-hongjiu"></use>
                    </svg>
                    <div class="name">红酒</div>
                    <div class="fontclass">#el-icon-zzl-hongjiu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-naicha"></use>
                    </svg>
                    <div class="name">奶茶</div>
                    <div class="fontclass">#el-icon-zzl-naicha</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-jiweijiu"></use>
                    </svg>
                    <div class="name">鸡尾酒</div>
                    <div class="fontclass">#el-icon-zzl-jiweijiu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-bingqilin"></use>
                    </svg>
                    <div class="name">冰淇淋</div>
                    <div class="fontclass">#el-icon-zzl-bingqilin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-paozao"></use>
                    </svg>
                    <div class="name">泡澡</div>
                    <div class="fontclass">#el-icon-zzl-paozao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-yeshu"></use>
                    </svg>
                    <div class="name">椰树</div>
                    <div class="fontclass">#el-icon-zzl-yeshu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-riguangyu"></use>
                    </svg>
                    <div class="name">日光浴</div>
                    <div class="fontclass">#el-icon-zzl-riguangyu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-chonglang"></use>
                    </svg>
                    <div class="name"> 冲浪</div>
                    <div class="fontclass">#el-icon-zzl-chonglang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-dengta"></use>
                    </svg>
                    <div class="name">灯塔</div>
                    <div class="fontclass">#el-icon-zzl-dengta</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-zhishipai"></use>
                    </svg>
                    <div class="name">指示牌</div>
                    <div class="fontclass">#el-icon-zzl-zhishipai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-hanglvxiang"></use>
                    </svg>
                    <div class="name">行旅箱</div>
                    <div class="fontclass">#el-icon-zzl-hanglvxiang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-dongche"></use>
                    </svg>
                    <div class="name">动车</div>
                    <div class="fontclass">#el-icon-zzl-dongche</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-feiji"></use>
                    </svg>
                    <div class="name">飞机</div>
                    <div class="fontclass">#el-icon-zzl-feiji</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-yueyeche"></use>
                    </svg>
                    <div class="name">越野车</div>
                    <div class="fontclass">#el-icon-zzl-yueyeche</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-qianbao"></use>
                    </svg>
                    <div class="name">钱包</div>
                    <div class="fontclass">#el-icon-zzl-qianbao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-ditu"></use>
                    </svg>
                    <div class="name">地图</div>
                    <div class="fontclass">#el-icon-zzl-ditu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-zzl-changyi"></use>
                    </svg>
                    <div class="name">长椅</div>
                    <div class="fontclass">#el-icon-zzl-changyi</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#el-icon-zzl-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
